<script type="text/javascript" src="${base}/scripts/jsgl/cgjsd_detail.js"></script>
<div id="cgjsd_tab" detail="true" class="easyui-tabs" data-options="fit:true,border:false">

    <div title="采购结算单">
        <table style="width: 99%;" class="tb tab-t t-bor">
            <input type="hidden" id="cgjsd_detail_id" value="${(cgjsd.id)!}"/>
            <col width="70px"/>
            <col width=""/>
            <col width="70px"/>
            <col width=""/>
            <col width="70px"/>
            <col width=""/>
            <tr>
                <th>结算单号：</th>
                <td colspan="5">
                ${(cgjsd.jsdh)!}
                </td>
            </tr>
            <tr>
                <th>总部结算：</th>
                <td colspan="3">
                    <#if cgjsd?? && cgjsd.zbjs?? && cgjsd.zbjs>是<#else>否</#if>
                </td>
                <th>采购公司：</th>
                <td>
                    ${(cgjsd.cggs.jc)!}
                </td>
            </tr>
            <tr>
                <th>申报公司：</th>
                <td colspan="3">${(cgjsd.gs.jc)!}</td>
                <th>申&nbsp;请&nbsp;人：</th>
                <td>${(cgjsd.sqr.xm)!}</td>
            </tr>
            <tr>
                <th>供&nbsp;应&nbsp;&nbsp;商：</th>
                <td>${(cgjsd.glqy.qc)!}</td>
                <th>纳&nbsp;税&nbsp;&nbsp;号：</th>
                <td>${(cgjsd.glqy.qyfr.nsh)!}</td>
                <th>发票种类：</th>
                <td>
                <#if (cgjsd.fpzl)?exists && (cgjsd.fpzl)==0>增票</#if>
                <#if (cgjsd.fpzl)?exists && (cgjsd.fpzl)==1>普票</#if>
                <#if (cgjsd.fpzl)?exists && (cgjsd.fpzl)==2>其他</#if>
                <#if (cgjsd.fpzl)?exists && (cgjsd.fpzl)==3>另开票</#if>
                </td>
            </tr>
            <tr>
                <th>发票张数：</th>
                <td>${(cgjsd.fpzs)!}</td>
                <th>发票号码：</th>
                <td>${(cgjsd.hm)!}</td>
                <th>发票总额：</th>
                <td>${(cgjsd.fpze)!}</td>
            </tr>
            <tr>
                <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
                <td colspan="5"></td>
            </tr>
            <tr>
                <th>制&nbsp;单&nbsp;&nbsp;人：</th>
                <td>${(cgjsd.createUser.xm)!}</td>
                <th>制单时间：</th>
                <td colspan="3">${(cgjsd.dateCreated?datetime)!}</td>
            </tr>
        </table>
    </div>
    <div title="结算单明细">
        <table id="cgjsd_jsdmx_table" class="easyui-datagrid"
               url="${base}/cggl/cgdgl/cgdmxSearchList?cgjsdId=${(cgjsd.id)!}"
               rownumbers="true" fit="true" fitColumns="true" showFooter="true">
            <thead>
            <tr>
                <th data-options="field:'cgdh',width:40,align: 'center'">采购单号</th>
                <th data-options="field:'wzgg.code',width:33,align: 'center'">物资编码</th>
                <th data-options="field:'wzgg.name',width:33,align: 'center'">物资名称</th>
                <th data-options="field:'wzgg.ggxh',width:33,align: 'center'">规格型号</th>
                <th data-options="field:'wzgg.cz',width:33,align: 'center'">材质</th>
                <th data-options="field:'ck',width:20,align: 'right'">长宽</th>
                <th data-options="field:'wzgg.dw',width:20,align: 'center'">单位</th>
                <th data-options="field:'rksl',width:50,formatter:formatJeForHtml2,align: 'right'">数量</th>
                <th data-options="field:'hsj',width:50,formatter:formatJeForHtml2,align: 'right'">含税价(元)</th>
                <th data-options="field:'sjdj',width:50,formatter:formatJeForHtml2,align: 'right'">实际单价(元)</th>
                <th data-options="field:'bhsj',width:50,formatter:formatJeForHtml2,align: 'right'">不含税价(元)</th>
                <th data-options="field:'je',width:50,formatter:formatJeForHtml2,align: 'right'">净额(元)</th>
                <th data-options="field:'se',width:50,formatter:formatJeForHtml2,align: 'right'">税额(元)</th>
                <th data-options="field:'ce',width:50,formatter:formatJeForHtml2,align: 'right'">差额(元)</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="资金补差单">
        <table id="cgjsd_zjbcd_table" class="easyui-datagrid"
               url="${base}/jsgl/zjbcd/zjbcdDetailList?cgjsdId=${(cgjsd.id)!}"
               rownumbers="true" fit="true" fitColumns="true" showFooter="true">
            <thead>
            <tr>
                <th data-options="field:'lb.z',width:40,align: 'center'">类别</th>
                <th data-options="field:'wzgg.code',width:33,align: 'center'">物资编码</th>
                <th data-options="field:'wzgg.name',width:15,align: 'center'">物资名称</th>
                <th data-options="field:'wzgg.ggxh',width:30,align: 'center'">规格型号</th>
                <th data-options="field:'wzgg.cz',width:30,align: 'center'">材质</th>
                <th data-options="field:'wzgg.dw',width:10,align: 'center'">单位</th>
                <th data-options="field:'je',width:50,formatter:formatJeForHtml2,align: 'right'">金额(元)</th>
                <th data-options="field:'cgd.cgdh',width:50,align: 'center'">采购单</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="采购结算单打印">
        <div id="cgjsd-dy-toolbar">
            <div class="PTools">
                <ul class="niu">
                    <li><span class="xuan">选择打印机：</span>
                        <select class="ze" name="" style="">
                            <option>——默认——</option>
                        </select>
                    </li>
                    <li><a class="she" href="javascript:void(0);" onclick="checkIsInstall()">检查插件</a></li>
                    <li><a class="watch" href="javascript:void(0);" onclick="cgjsd_dyPrintPreview()">打印预览</a></li>
                </ul>
            </div>
            <div id="cgjsd_dy_id">
                <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
                    <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0
                           pluginspage="install_lodop32.exe"></embed>
                </object>
                <div id="cgjsd_dy_print_id" class="textcon">
                    <table id="cgjsd_dy_print_table" class="tb" style="width: 100%;font-size:13px;">
                        <colgroup>
                            <col width="10%;"/>
                            <col width="25%"/>
                            <col width="23%;"/>
                            <col width="12%"/>
                            <col width="12%;"/>
                            <col width="23%"/>
                        </colgroup>
                        <tbody>
                        <tr>
                            <th>供&nbsp;应&nbsp;&nbsp;商：</th>
                            <td>
                                <input class="input-tian" readonly="readonly"
                                       value="${(cgjsd.glqy.qc)!}"/>
                            </td>
                            <td rowspan="2" colspan="2" style="text-align: center;font-size: 20px">${(cgjsd.gs.qc)!}
                                采购结算单
                            </td>
                            <th>结算单号:</th>
                            <td>
                                <input class="input-tian" readonly="readonly"
                                       value="${(cgjsd.jsdh)!}"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <div id="cgjsd_dy_cgjsd_id" class="textcon"></div>

                <div id="cgjsd_dy_detail_id" class="textcon">
                    <table class="tb" style="width: 100%;font-size:13px;">
                        <colgroup>
                            <col width="9%;"/>
                            <col width="20%"/>
                            <col width="10%;"/>
                            <col width="20%"/>
                            <col width="10%;"/>
                            <col width="20%"/>
                        </colgroup>
                        <tbody>
                        <tr>
                            <th style="font-size: 12px;">代垫费用:</th>
                            <td>
                                <input class="input-tian" readonly="readonly"
                                       value="${(cgjsd.ddfy)!}"/>
                            </td>
                            <th style="font-size: 12px;">发票号码:</th>
                            <td colspan="3">
                                <input class="input-tian" readonly="readonly"
                                       value="${(cgjsd.hm)!}"/>
                            </td>
                        </tr>
                        <tr>
                            <th style="font-size: 12px;">发票张数:</th>
                            <td>
                                <input class="input-tian" readonly="readonly"
                                       value="${(cgjsd.fpzs)!}"/>
                            </td>
                            <th style="font-size: 12px;">申请人：</th>
                            <td><input class="input-tian" readonly="readonly"
                                       value="${(cgjsd.sqr.xm)!}"/>
                            </td>
                            <th style="font-size: 12px;">制单人：</th>
                            <td><input class="input-tian" readonly="readonly"
                                       value="${(cgjsd.createUser.xm)!}"/>
                            </td>
                        </tr>
                        <tr>
                            <th></th>
                            <td colspan="1"></td>
                            <th></th>
                            <td colspan="1"></td>
                            <th></th>
                            <td>${(CurrentTime?string('yyyy-MM-dd HH:mm:ss'))!}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>



